<?php namespace Zmsun\Http\Header;class RetryAfter extends AbstractDate{protected$deltaSeconds=3600;public static function fromString($headerLine){$dateHeader=new static();list($name,$date)=GenericHeader::splitHeaderLine($headerLine);if(strtolower($name)!==strtolower($dateHeader->getFieldName())){throw new \InvalidArgumentException('Invalid header line for "'.$dateHeader->getFieldName().'" header string');}if(is_numeric($date)){$dateHeader->setDeltaSeconds($date);}else{$dateHeader->setDate($date);}return$dateHeader;}public function setDeltaSeconds($delta){$this->deltaSeconds=(int)$delta;return$this;}public function getDeltaSeconds(){return$this->deltaSeconds;}public function getFieldName(){return'Retry-After';}public function getFieldValue(){return($this->date===null)?$this->deltaSeconds:$this->getDate();}public function toString(){return'Retry-After: '.$this->getFieldValue();}}